<%@ page import="java.sql.*"%>
<%@ include file="dbconn.jsp" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Request Portal</title>
<link href="/tros/menuMain.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width=100% bordercolor="#C6D4E1" bgcolor="#C6D4E1">
<tr><th scope="col"><div align="center"><h1 align="center"><font face="Times New Roman">Tros - Online Banking System </font></h1></div></th></tr>
</table>
<div id="overall" align="center">
<div id="dropdwn" align="center">
<ul>
<li><a href='adminHome.jsp'>Home</a>
</li>
</ul>
<ul>
<li><a href='custFunc.jsp?value=<%=session.getAttribute( "currentID" )%>'>Customers</a>
<ul>
<li><a href='addNewUser.jsp?value=<%=session.getAttribute( "currentID" )%>'>Add User</a></li>
<li><a href=''>View Transactions</a></li>
</ul>
</li>                                   
</ul>
<ul>
<li><a href='reqPortal.jsp?value=<%=session.getAttribute( "currentID" )%>'>Customer Requests</a>
</li>
</ul>
<ul>
<li><a href='logout.jsp'>Log Out</a></li>
</ul>
<br class="flow" />
</div>
</div>
&nbsp;
&nbsp;
<fieldset>
<legend><b>Deposit</b></legend>
<h3 align=center> Cheque Information of Customer</h3>
<form name="perDepo" action="ChqReqValidation" method="post">
<table width=50% align=center cellpadding=5 cellspacing=0 bgcolor="#D5FFD5">
<tr><td>&nbsp;</td><tr> 
<%
String Chqno = request.getParameter("value").trim();
%>
<tr><td><input type="hidden" name="name" value="<%=Chqno%>" size=25/></td></tr>
<%
try
{
	PreparedStatement state=connect.prepareStatement("SELECT * FROM CHQREQ WHERE CHQ_NO=?");
	state.setString(1,Chqno);
	ResultSet result=state.executeQuery();
	
	while(result.next()){
		
		String AccNo=result.getString("ACC_NO");
	    String AccType=result.getString("ACC_TYPE");
	    String ChqAmt=result.getString("CHQ_AMOUNT");
	    String Transno=result.getString("CHQ_TRANSNO");
	    String Time=result.getString("DATE_TIME");
	    String custID=result.getString("CUSTOMERID");
%>
<tr>
<td><div align="center"><b>Customer ID</b></div></td>
<td bgcolor="#D5FFD5"><%=custID%></td>
</tr>
<tr>
<td><div align="center"><b>Account No </b></div></td>
<td bgcolor="#D5FFD5"><%=AccNo%></td>
</tr>
<tr>
<td><div align="center"><b>Account Type </b></div></td>
<td bgcolor="#D5FFD5"><%=AccType%></td>
</tr>
<tr>
<td><div align="center"><b>Cheque Amount</b></div></td>
<td bgcolor="#D5FFD5"><%=ChqAmt%></td>
</tr>
<tr>
<td><div align="center"><b>Cheque Number </b></div></td>
<td bgcolor="#D5FFD5"><%=Chqno%></td>
</tr>
<tr>
<td><div align="center"><b>Transit Number </b></div></td>
<td bgcolor="#D5FFD5"><%=Transno%></td>
</tr>
<tr>
<td><div align="center"><b>Upload Time </b></div></td>
<td bgcolor="#D5FFD5"><%=Time%></td>
</tr>
<%
  }
	state.close();
	connect.close();
} catch (Exception e) {	
	System.out.println("----------> error ------>"+e.getMessage());
}
%>
<tr>
<td colspan=2 align=center bgcolor="#D5FFD5"><button type="submit" name="approve" value="approve"><u>A</u>pprove</button>&nbsp;<button type="submit"  name="decline" value="decline"><u>D</u>ecline</button></td> 
</tr>
<tr><td>&nbsp;</td><tr>
<tr><td colspan="2"><div align="center"><a href="adminHome.jsp">Home</a></div></td><tr>
<tr><td>&nbsp;</td><tr>
</table>
</form>
</fieldset>
</body>
</html>